﻿<!--#include file="conn.asp"-->
<html>
<head>
    <meta http-equiv='Content-Type' content="text/html; charset=utf-8">
    <title>生成分类HTM页</title>
    <link href="images/style.css" type="text/css" rel="stylesheet">
</head>
<body>
    <table width="98%" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="#CCCCCC">
        <tr>
            <td bgcolor="e7e7e7">
                <strong>生成HTML 地区列表页 </strong>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FFFFFF">
                <%
if request("type")<>"" then
         if request("page")<>"" then
           page=cint(request("page"))
           D=request("D")
         else        
           page=1
           D=timer()
         end if
mpage=1
mpage1=1
MaxPerPage=14400000
classid=request("classid")
set rs=server.createobject("adodb.recordset")
if request("type")="all" then
rs.open ("select id from diqu order by id desc"),conn,1,1
        if not rs.eof then
        rs.pagesize=1
        mpage1=rs.pagecount 
        rs.move  (page-1)*1
        do while not rs.eof
        i=i+1
         classid=rs("id")
        if i>=1 then exit do
        rs.movenext
        loop
        rs.close
        end if
     end if

if classid<>"" then
sql="select * from diqu where id = '"&classid&"'"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
classid=rs("id")
rs.MoveNext
loop
end if
rs.close
     rs.open ("select * from comics where dqid in("&classid&")"),conn,1,1
     if not rs.eof then 
     rs.pagesize=MaxPerPage  
     mpage=rs.pagecount   
     else
     mpage=1
     end if
     rs.close
end if
set rs=nothing
conn.close  
set conn=nothing
response.write"<font color=""#FF0000"">"&page&"</font>/<font color=""#FF0000"">"&mpage1&"</font> 正在生成分类Html页....<span id=showImport></span><IE:Download ID=""oDownload"" STYLE=""behavior:url(#default#download)"" />"
for ii=1 to mpage
m=m+1
'response.write"<script>function onDownloadDone(downDate){showImport.innerHTML=downDate}oDownload.startDownload('make_htmlclass2.asp?MaxPerPage="&MaxPerPage&"&classid="&classid&"&page="&ii&"',onDownloadDone)</script>"
response.write"<script>function onDownloadDone(downDate){showImport.innerHTML=downDate}oDownload.startDownload('makehtml.aspx?a=diqu&MaxPerPage="&MaxPerPage&"&classid="&classid&"&page="&ii&"',onDownloadDone)</script>"
next
if page<mpage1 then
response.write"<meta http-equiv=""refresh"" content=""0;url='make_htmlclassall2.asp?type="&request("type")&"&classid="&request("classid")&"&page="&page+1&"&m="&request("m")+m&"&D="&D&"'"">"
else
response.write"<meta http-equiv=""refresh"" content=""0;url='make_htmlclassall2.asp?ok="&page&"&m="&request("m")+m&"&D="&D&"'"">"
end if
else 
response.write"操作成功:共生成分成分类<font color=""#FF0000"">"&request("ok")&"</font> 页面<font color=""#FF0000"">"&request("m")&"</font>总费时<font color=""#FF0000"">"&FormatNumber((timer()-request("D")),2)&"</font>秒 完成时间"&Now()&""
end if
                %>
            </td>
        </tr>
    </table>
</body>
</html>
